Computers connected to wide area networks like the Internet are commonly connected via NAT/NAPT devices and/or protected by firewalls. Firewalls are most commonly used to protect computers operating on local area networks, but they can also be used to protect individual computers, including servers, which access a wide area network. In this application, the term “client computer” will encompass any computer with access to a wide area network, and also a program operating on such a computer. Such a computer may, but need not, operate on a local area network, and may perform the functions of a server on the wide area network.
Firewalls typically perform a number of functions. They protect internal computers from outside computers on the wide area network, while allowing internal computers to access the wide area network. Firewalls can also make local network administration more efficient, by permitting a large number of client computers to share a limited pool of Internet Protocol (IP) addresses on the wide area network, and by accommodating changes within the local network without having to re-configure access to the other computers on the wide area network.
A firewall is typically a program or collection of related programs on a network gateway server, which check each network packet to determine whether to forward it to its destination. To create a barrier between an internal computer and the outside wide area network, firewalls commonly use NAT (network IP address translation) or NAPT (network IP address and port translation). NAT is the translation of an internal IP address used by a client computer (and known within the internal network, if the client computer is operating on one), to a different IP address known within the outside wide area network. The firewall maps internal IP addresses to one or more global external IP addresses, and reverse maps the external IP addresses on incoming packets back into internal IP addresses. NAPT is the translation of both internal IP addresses and internal ports to different external IP addresses and external ports known within the outside network. Firewalls using NAPT commonly screen incoming packets to make sure that they come from a previously identified IP address and port. That is, a request from a particular IP address and port traverses the firewall only if a request previously went out from the firewall to that IP address and port. As used in this document the term “translation device” will include NAT devices and NAPT devices, including routers and firewalls.
There are many types of firewalls and NAT/NAPT devices, and one major difference between such types is the way the firewalls or devices assign, or map, an external port. Some firewalls use the same external port for all packet destinations, other firewalls increment to the next external port for every new packet destination IP address, other firewalls use the same external port for the same packet destination host IP address, but increment to the next external port for a new packet destination host, and yet other firewalls use random algorithms to select an external port.
Data transmission over the Internet has become an everyday occurrence. Many Internet data transmissions are used to transport audio and/or video data from a live or on-demand streaming server to streaming clients, to provide real-time interactive communication (such as “chat”) between client computers, to transport the contents of web-pages from web-servers to web-clients, and for many other types of communication among networked programs. Different protocols are used to transmit different types of data. For example, text chat is generally transmitted using Transmission Control Protocol (TCP), while audio/video conferencing and live audio/video streaming are generally transmitted using UDP (User Datagram Protocol). Communications through a server connected directly to the Internet (that is, not behind a firewall) are not generally obstructed by client-side firewalls; the act of logging on to a server generally opens a return path from the server through the firewall. However, firewalls commonly block direct client-to-client, or “peer-to-peer” communication. One attempted solution is to open certain ports in the firewall, but this solution (i) requires modification of the firewall settings, which most network administrators are reluctant to do, and (ii) does not work with firewalls that perform any sort of port translation. The present invention provides a method for permitting packet based data transmission to traverse firewalls using either NAPT or NAT without altering firewall settings. The invention is disclosed in the context of a firewall using NAPT, as the more general case. However, the method provided in the invention is equally applicable to a firewall using NAT, and also to other types of devices, such as routers, using either NAPT or NAT.